package com.chuangke.elasticsearch.model;

import java.util.List;
import java.util.Map;

public class ElasticQuery<T> {

	/**
	 * 索引名
	 */
	private String idxName;
	/**
	 * 页码，从1开始//spring elasstic 从0开始
	 */
	private long pageNum;
	/**
	 * 页面大小
	 */
	private long pageSize;
	/**
	 * 总数
	 */
	private long total;
	/**
	 * 总页数
	 */
	private long pages;
	/**
	 * 具体条件
	 */
	private Map<String, Object> query;

	// 耗时
	private long elapsedTime;

	private List<T> results;

	public String getIdxName() {
		return idxName;
	}

	public void setIdxName(String idxName) {
		this.idxName = idxName;
	}

	public long getPageNum() {
		return pageNum;
	}

	public void setPageNum(long pageNum) {
		this.pageNum = pageNum;
	}

	public long getPageSize() {
		return pageSize;
	}

	public void setPageSize(long pageSize) {
		this.pageSize = pageSize;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

	public long getPages() {
		return pages;
	}

	public void setPages(long pages) {
		this.pages = pages;
	}

	public Map<String, Object> getQuery() {
		return query;
	}

	public void setQuery(Map<String, Object> query) {
		this.query = query;
	}

	public long getElapsedTime() {
		return elapsedTime;
	}

	public void setElapsedTime(long elapsedTime) {
		this.elapsedTime = elapsedTime;
	}

	public List<T> getResults() {
		return results;
	}

	public void setResults(List<T> results) {
		this.results = results;
	}

}
